<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var reg =/^abc$/;
        var result =reg.test('abbc');
        // console.log(result);
        reg = /^aaa[bc]c$/;
        result =reg.test('abc');
        console.log(result);
    </script>
</head>
<body>

</body>
</html>